'''
data = []
counts = {}
with open("./benchmarks/MY/FD/train2id.txt", 'r', encoding='utf-8') as f:
    lines = f.readlines()
    for line in lines:
        data.append(line.split())
f.close()
print(data[1:])
for d1 in data[1:]:
    if d1[1] not in counts.keys():
        count = 0
        for d2 in data[1:]:
            if d2[1] == d1[1]:
                count+=1
        counts[d1[1]] = count

print(counts)
sum = 0
for key in counts.keys():
    sum+=counts[key]

print(sum/len(counts.keys()))
'''
data = []
with open("./benchmarks/MY/医学知识/uncertainty.txt", 'r', encoding='utf-8') as f:
    lines = f.readlines()
    for line in lines:
        data.append(line.split())
f.close()
# print(data)
avg = 0.0
std = 0.0
for d1 in data[1:]:
    avg += float(d1[2])
    std += (float(d1[2])-0.290)*(float(d1[2])-0.290)
print(avg/len(data[1:]))
print(std/len(data[1:]))